package com.kotlin.heimaplayer.presenter.impl

import com.kotlin.heimaplayer.model.CommonResultBean
import com.kotlin.heimaplayer.net.ResponseHandler
import com.kotlin.heimaplayer.net.VideoPlayUrlRequest
import com.kotlin.heimaplayer.presenter.interf.VideoPlayUrlPresenter
import com.kotlin.heimaplayer.view.VideoPlayUrlView

class VideoPlayUrlPresenterImpl(val videoPlayUrlView: VideoPlayUrlView):VideoPlayUrlPresenter, ResponseHandler<CommonResultBean<String>> {
    override fun onError(type: Int, msg: String?) {
        videoPlayUrlView.onError(msg)
    }

    override fun onSuccess(type: Int, result: CommonResultBean<String>) {
        videoPlayUrlView.onSuccess(result)
    }

    override fun getVideoPlayUrl(vid:String) {
        VideoPlayUrlRequest(vid,this).excute()
    }

}